redis 套件的 Property 'on' does not exist on type 'RedisClientType'


再用 typescript 開發時發現 client.on('error', (err) => console.log('Redis Client Error', err)); 會跳出錯誤 Property 'on' does not exist on type 'RedisClientType' ,加上 npm i -D @types/node 就解決了

#TypeScript #VS Code #Redis #nodejs #ts #js #Node






你可能感興趣的文章

實作 PHP API & 留言板 SPA(下)

實作 PHP API & 留言板 SPA(下)

運用 Cli 部署 Vue專案 到 GitHub Pages

運用 Cli 部署 Vue專案 到 GitHub Pages

立即呼叫函式表達式(IIFE)

立即呼叫函式表達式(IIFE)






留言討論